1. Field of the Invention
This invention relates to information systems and, more particularly, to a system and method for rewriting indirect addresses.
2. Background of the Invention
Many individuals and organizations have web sites comprising large numbers of web pages. These web sites are created and periodically changed, modified, or updated. It is desirable to provide an Internet-based web publishing system and method that simplifies the creation and editing of web sites. In such a web publishing system, the locations of some web pages can change in relation to one another as pages are created, edited, previewed, published, and maintained. For example, a web page may be in one location during editing, then moved to another location for normal use and viewing of that web page. System maintenance may require that web pages be moved from server to server. Certain uniform resource locators (“URL”s) within the web pages do not function correctly if the location of the web pages containing the URL changes.
The example of a site relative URL illustrates why certain URLs do not work correctly when the web page containing the URL changes. Web sites commonly employ site relative URLs to link content together on a web site. Site relative URLs specify a location relative to the current server. Since the current server may change when the location of the web page changes, the web page will not function correctly if the site relative URL does not change.
For example, assume the web page “doc.html” is being edited within a web publishing system at the absolute URL location of “http://www.editing.com/files/doc.html”. The site relative URL “/images/logo.gif” is used to reference a graphic within “doc.html”. The image “logo.gif” exists only on the destination web site at “http://www.random.com/images/logo.gif”, which is external to the web publishing system. When the web page is stored on the destination web site, the site relative URL will function correctly. However, if the web page is stored on the web publishing system, the browser previewing the edited content of “doc.html” will improperly resolve the site relative URL to “http://www.editing.com/images/logo.gif.” Since “logo.gif” does not exist at this location, the preview of the web page fails. Similar issues occur when web pages are published to a staging server for testing and quality assurance purposes.
Therefore, there is a need for a method and system to automatically modify URLs so that the URLs of web pages work correctly in a web publishing or similar system.